import {request} from '../utils/util';
import FormData from '../utils/formdata';
const defaultSettings = require('../config/defaultSettings')
export function upload (file) {
	let formData = new FormData(); 
  formData.append('file', file.tempFilePath)
  const data = formData.getData()
  console.log(data.contentType)
  return request({
      url: defaultSettings.uploadServer,
      data: data.buffer,
      header: {
        'content-type': data.contentType
      },
  })
}